import service from '@/utils/request'

// 新增菜单
export function menuAddApi(data) {
  return service({
    url: '/menu/add',
    method: 'post',
    data
  })
}

// 编辑菜单
export function menuEditApi(data) {
  return service({
    url: '/menu/edit',
    method: 'post',
    data
  })
}
// 删除菜单
export function menuDeleteApi(id) {
  return service({
    url: `/menu/delete/${id}`,
    method: 'delete'
  })
}
// 树形菜单列表
export function menuTreeListApi() {
  return service({
    url: '/menu/treeList',
    method: 'get'
  })
}
